<template>
    <div class="mt-20">
        <el-button type="primary" icon="SwitchButton" @click.native="do_it" >关机</el-button>
        <el-button type="primary" icon="Refresh" @click.native="do_reboot">重启</el-button>
    </div>
</template>

<script>
import axios from 'axios' 
export default{
    methods: {
        do_it (){
            this.$apiFun.getlist().then((rv) => {
                console.log(rv);
            })
        },
        do_reboot (){
            let baseURL = ''
            let config = {
                baseURL: baseURL,
                headers:{'Content-Type': 'application/json;charset=UTF-8'},
                timeout: 2000 ,      //设置最大请求时间
            }
            const _axios = axios.create(config)
            _axios.get('/api/baidu/?city=wuhan', {}).then((rv) => {
                console.log(rv);
            })
        }
    }
}
</script>